<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>更新学生信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .container {
            max-width: 600px;
            margin: 20px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h1 {
            text-align: center;
        }
        form {
            margin-top: 20px;
        }
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        input[type="text"],
        input[type="number"] {
            width: 100%;
            padding: 8px;
            margin-bottom: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }
        button {
            background-color: #4caf50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<div class="container">
    <h1>更新学生信息</h1>
    <form th:action="@{/student/update/{id}(id=${student.sid})}" method="post">
        <input type="hidden" name="sid" th:value="${student.sid}" />
        <div>
            <label for="sname">学生姓名:</label>
            <input type="text" id="sname" name="sname" th:value="${student.sname}" required />
        </div>
        <div>
            <label for="course">课程:</label>
            <input type="text" id="course" name="course" th:value="${student.course}" required />
        </div>
        <div>
            <label for="age">年龄:</label>
            <input type="number" id="age" name="age" th:value="${student.age}" required />
        </div>
        <div>
            <button type="submit">更新学生</button>
        </div>
    </form>
</div>
</body>
</html>
